﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<EKAABSInformationManagement.Database.requirementRecords>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    物品申请管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="<%: Url.Content("~/Scripts/userJs/request.js") %>" type="text/javascript"></script>
    <div class="dashboard">
        <%if (Model.Count > 0 && Model[0].status == 0)
          {%>
        <input type="button" id="btnReceive" value="受理选中申请" class="recPassRejectItem" name="receive" />
        <input type="button" id="btnReject" value="拒绝选中申请" class="recPassRejectItem" name="reject" />
        <%}
          else if (Model.Count > 0 && Model[0].status == 1)
          {%>
        <input type="button" id="btnPass" value="通过选中申请" class="recPassRejectItem" name="pass" />
        <input type="button" id="btnReject" value="拒绝选中申请" class="recPassRejectItem" name="reject" />
        <%}
          else
          {  %>
        <input type="button" id="btndisabled1" value="受理选中申请" disabled="disabled" />
        <input type="button" id="btndisabled2" value="通过选中申请" disabled="disabled" />
        <input type="button" id="btndisabled3" value="拒绝选中申请" disabled="disabled" />
        <%} %>
    </div>
    <div class="content">
        <p class="thead">
        </p>
        <table id="tblMain">
            <tr>
                <th>
                    <input id="cbkAll" type="checkbox" />
                </th>
                <th scope="col">
                    申请编号
                </th>
                <th scope="col">
                    物品名称
                </th>
                <th scope="col">
                    申请数量
                </th>
                <th scope="col">
                    描述
                </th>
                <th scope="col">
                    状态
                </th>
                <th scope="col">
                    申请人
                </th>
                <th scope="col">
                    日期
                </th>
                <th scope="col">
                    回复
                </th>
            </tr>
            <%foreach (var a in Model)
              {%>
            <tr>
                <td class="row">
                    <input id="<%=a.ID %>" type="checkbox" />
                </td>
                <td class="row">
                    <%=a.ID %>
                </td>
                <td class="row">
                    <%=a.productName %>
                </td>
                <td class="row">
                    <%=a.number %>
                </td>
                <td class="row">
                    <%=a.description %>
                </td>
                <td class="row" status="<%=a.status %>">
                    <%= Enum.GetName(typeof(EKAABSInformationManagement.Service.itemStatus), a.status)%>
                </td>
                <td class="row">
                    <%=a.employee %>
                </td>
                <td class="row">
                    <%=Convert.ToDateTime(a.date).ToString("yyyy/MM/dd", System.Globalization.DateTimeFormatInfo.InvariantInfo)%>
                </td>
                <td class="row">
                    <%=a.comments %>
                </td>
            </tr>
            <%} %>
        </table>
    </div>
    <div id="greybackground">
    </div>
    <div class="popupWindow">
        <p class="closePopup">
            </p>
        <h2 class="titlePopup">
            填写受理申请理由</h2>
        <table class="tbladd">
            <tr>
                <td>
                </td>
                <td>
                    描述：
                </td>
                <td>
                    <textarea id="itemComments" cols="30" rows="6"></textarea>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                    <input id="itemID" type="hidden" />
                </td>
                <td style="text-align: right;">
                    <input class="loginBtn" type="button" id="btnSubmitCom" value="确定" />
                </td>
                <td style="text-align: center;">
                    <input class="loginBtn" type="reset" id="btnResetCom" value="清空" />
                </td>
                <td>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
